/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package Interpreter.Function;

import Interpreter.InterpreterVisitor;
import ast.AST;
import java.util.ArrayList;

/**
 *
 * @author Stephen
 */
public class IsFloatFunction extends Function{
    @Override
    public Object execute(ArrayList args) {
        Object var = ((AST)args.get(0)).accept(new InterpreterVisitor());
        String type = InterpreterVisitor.parseType(var.toString());
        if (type.equalsIgnoreCase("float")) {
            return true;
        } else {
            return false;
        }
    }
}
